package service;

import dao.FlightGroupDAOImpl;
import logic.Navigator;
import logic.Pilot;
import logic.Stewardess;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Vovancho on 15.12.2014.
 */
@ManagedBean
@SessionScoped
public class FlightGroup {

    public int getPilotId() {
        return pilotId;
    }

    public void setPilotId(int pilotId) {
        this.pilotId = pilotId;
    }

    private int pilotId;

    private FlightGroupDAOImpl flightGroupDAO = new FlightGroupDAOImpl();
    private PilotServiceImpl pilotService;
    private NavigatorServiceImpl navigatorService;
    private StewardessServiceImpl stewardessService;

    private Pilot firstPilot;

    public void addFirstPilot(int pilotId){
        firstPilot = pilotService.pilotById(pilotId).get(0);
    }

    public void createSampleFlight()
    {
      flightGroupDAO.addFlightGroup(new logic.FlightGroup(1,2,1,1));
    }
}